package com.yyx.server.service;

import com.yyx.server.pojo.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yyx.server.pojo.Menu;
import com.yyx.server.pojo.Role;
import com.yyx.server.vo.ResultVo;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author YongXin
 * @since 2021-07-24
 */
public interface AdminService extends IService<Admin> {

    ResultVo login(String username, String password,String code,HttpServletRequest request);

    Admin getAdminByUserName(String name);

    List<Role> getRoles(Integer adminId);

    List<Admin> getAllAdmins(String keywords);

    ResultVo updAdminRoles(Integer aid, Integer[] rids);

    ResultVo updateAdmin(Admin admin);

    ResultVo updAdminPassword(String oldPass, String pass, Integer adminId);

    ResultVo updAdminFace(String url, Integer id, Authentication authentication);
}
